<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
	<title>title</title>
	<script type="text/javascript" src="../../js/libs/jquery-1.5.2.js"></script>
	<script type="text/javascript">
	//2窗口发消息
	//跨域请求
	//function postMessage(url,msg){
	//	iframe=document.createElement('iframe');
	//	iframe.scr=url;
	//	iframe.onload=function(e){
	//		console.log(e);
	//	}
	//	document.body.appendChild(iframe);
	//	
	//}
	function csdName(url){
		_iframe=document.createElement('iframe');
		_iframe.src=url;
		_iframe.style.display='none';
		_iframe.onload=function(){
			_iframe.src='about:blank';
			_iframe.onload=function(){
				return _iframe.contentWindow.name;
			};
		}
		document.body.appendChild(_iframe);
	}
	$(function(){
		console.log(csdName('http://ctphp.local.com/demo/crosssite/server.php'));
		});
	
	</script>
</head>
<body>
	
</body>
<script type="text/javascript">
</script>
</html>

